<template>

    <div class="home">
        <div class="header"><span>大学生志愿系统</span></div>
        <div class="nav">
            <div class="profile" @click="myinfo">
                <span class="left">李华</span>
                <span class="right">></span>
            </div>
            <div class="menu">
                <div class="menu1">
                <div class="activities" @click="activities"><span>认领活动</span></div>
                <div class="heart" @click="heart"><span>爱心报表</span></div>
                <div class="service" @click="service"><span>服务纪实</span></div>
                <div class="myService" @click="myService"><span>我的服务</span></div>
                </div>
            </div>
            
        </div>
        <div class="content">
            <div class="top">
                <span class="left">志愿活动</span><span class="right">查看更多></span>
            </div>
            <div v-for="item in activities":key="item.id">
                <img>
                {{ item.title }}
                <br>
                {{ item.time }}
                <br>
                {{ item.tag }}
            </div>
        </div>
    </div>
</template>

<script setup>
import {  useRouter } from 'vue-router';

let router = new useRouter()

const myinfo = () => {
    router.push('/profile')
}
const activities = () => {
    router.push('/activityList')
}
const heart = () => {
    router.push('/rank')
}
const service = () => {
    router.push('/activityDetail')
}
const myService = () => {
    router.push('/mySignup')
}


</script>

<style scoped>

.home{
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    max-height: 100vh;
    background-color: rgb(214, 205, 205);
}

.header span{
    color: #fff;
    font-size: 30px;
    margin-bottom: 20px;
}

.header,.nav{
    height: 120px;
    border: 1px solid black;
}
.header{
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}
.nav{
    background-color: rgb(214, 205, 205);
    padding: 10px;
    position: relative;

}
.nav .left, .nav .right{
    line-height: 60px;
    text-align: center;
}
.nav .left{
    float: left;
    padding-left: 100px;
    
}
.nav .right{
    float: right;
    padding-right: 20px;
}


.profile,.menu{
    background-color: #fff;
    border-radius: 10px;
}
.profile{
    height: 60px;
    width: 390px;
    position: absolute;
    top: -40px;
}

.menu{
    height: 100px;
    width: 390px;
    margin-top: 20px
    
}
.menu1{
    padding: 15px;
    display: flex;
    line-height: 80px;
    text-align: center;
}
.menu1 div{
    width: 90px;
    
}
.content{
    flex: 1;
    background-color: #fff;
    padding: 5px;
}
.content .top{
    height: 30px;
}
.content .left, .content .right{
    line-height: 30px;
    text-align: center;
}
.content .left{
    float: left;
    
}
.content .right{
    float: right;
    padding-right: 20px;
}

</style>